I think it could be something to do with my UI panel. If I make a simple test script, it doesn't fail. But in my main script it does. Here is snippet of the code where I'm calling the function and prompt. dlg = new Window(alertBuilderResource); dlg.locPnl.dataFile.locBtn.onClick = function(){findSomething("file", dlg.locPnl.dataFile.et)}; return dlg } function findSomething(itemType, editText){ if(itemType == "file"){ var itemOut = new File.openDialog(editText.text,"", false); alert(itemOut.name); }else{ var itemOut = new Folder.selectDialog(stringPrompt); } if(itemOut){ $.writeln(itemOut.toString()); editText.text = itemOut.toString().replace(/%20/g," "); }else{ var itemOut = "there was an error, please try again"; } return itemOut }
... View more